<div class="container" data-ng-controller="cloudDiskCtrl as cdctrl">
  <div class="block-header">
    <h2>硬盘</h2>
  </div>

  <div class="card">
    
    <div class="card-body card-padding">
      <div class="btn-demo">
        <button class="btn btn-primary btn-icon-text" ng-click="openModal()"><i class="zmdi zmdi-home"></i> 创建云硬盘</button>
        <button class="btn btn-primary btn-icon-text" ng-click="refresh()"><i class="zmdi zmdi-refresh"></i></button>
      </div>

      <div class="table-responsive">
        <table ng-table="cdctrl.tableSorting" class="table table-striped table-vmiddle">
          <tr ng-repeat="w in $data">
            <td data-title="'名称'" sortable="'id'">
              {{ w.id }}
            </td>
            <td data-title="'容量'" sortable="'name'">
              <a href="" ng-click="toggleRightNav()">{{ w.name }}</a>
            </td>
            <td data-title="'挂载的云主机'" sortable="'email'">
              {{ w.email }}
            </td>
            <td data-title="'状态'" sortable="'username'">
              {{ w.username }}
            </td>
            <td data-title="'格式'">
              {{ w.contact }}
            </td>
            <td data-title="'创建时间'" sortable="'contact'">
              {{ w.contact }}
            </td>
          </tr>
        </table>

        <div class="card nxt-nav-right z-depth-2" ng-class="{'show': navOpen}">
          <!-- header button nav-right -->
          <div class="card-header">
            <div class="nav-right-btn">
              <ul class="actions">
                <li>
                  <a href="" ng-click="closeRightNav()">
                    <i class="zmdi zmdi-close"></i>
                  </a>
                </li>
              </ul>
            </div>
          </div>

          <!-- a group of card content -->
          <a class="card-header bgm-blue" href ng-click="toggle(0)">
            <h2>基本操作</h2>
          </a>
          <div class="card-body" ng-class="{active: status(0)}">
            <div class="btn-demo">
              <button class="btn btn-primary btn-icon-text" data-swal-success><i class="zmdi zmdi-home"></i> 创建快照</button>
              <button class="btn btn-primary btn-icon-text" data-swal-success><i class="zmdi zmdi-home"></i> 挂载到云主机</button>
              <button class="btn btn-warning btn-icon-text" data-swal-success><i class="zmdi zmdi-home"></i> 从云主机卸载</button>
              <button class="btn btn-danger btn-icon-text" data-swal-delete><i class="zmdi zmdi-home"></i> 删除</button>
            </div>
            <div class="btn-demo">
              <button class="btn btn-primary btn-icon-text" data-swal-success><i class="zmdi zmdi-home"></i> 硬盘扩容</button>
              <button class="btn btn-primary btn-icon-text" data-swal-success><i class="zmdi zmdi-home"></i> 设置只读</button>
              <button class="btn btn-primary btn-icon-text" data-swal-success><i class="zmdi zmdi-home"></i> 设置只写</button>
            </div>

          </div>
          <!-- end: card content -->

          <!-- a group of card content -->
          <a class="card-header bgm-blue" href ng-click="toggle(1)">
            <h2>格式转换</h2>
          </a>
          <div class="card-body" ng-class="{active: status(1)}">
            <div><p class="c-black f-500">目前格式：{{cdctrl.selected.pattern}}</p></div>

            <div class="row">
              <div class="col-sm-2"><p class="c-black f-500">转换为：</p></div>
              <div class="col-sm-10">
                <div class="form-group">
                  <div class="fg-line">
                    <input type="text" ng-model="config.sysname" class="form-control" >
                  </div>
                </div>
              </div>
            </div>

          </div>
          <!-- end: card content -->

          <!-- a group of card content -->
          <a class="card-header bgm-blue" href ng-click="toggle(2)">
            <h2>快照列表</h2>
          </a>
          <div class="card-body" ng-class="{active: status(2)}">
            <table ng-table="cdctrl.tableSorting" class="table table-striped table-vmiddle">
              <tr ng-repeat="w in $data">
                <td data-title="'ID'" sortable="'id'">
                  {{ w.id }}
                </td>
                <td data-title="'名称'" sortable="'name'">
                  <a href="">{{ w.name }}</a>
                </td>
                <td data-title="'状态'" sortable="'username'">
                  {{ w.username }}
                </td>
                <td data-title="'创建时间'" sortable="'contact'">
                  {{ w.contact }}
                </td>
              </tr>
            </table>

          </div>
          <!-- end: card content -->


        </div>
      </div>
    </div>


  </div>


  
</div>
